package com.zxyankh.raft.dto;

import com.alibaba.fastjson.JSON;

/**
 * @author ankh
 * @since 31.10.2017
 */
public class RequestVoteResponse {
    private int term;
    private boolean voteGranted;

    public int getTerm() {
        return term;
    }

    public void setTerm(int term) {
        this.term = term;
    }

    public boolean isVoteGranted() {
        return voteGranted;
    }

    public void setVoteGranted(boolean voteGranted) {
        this.voteGranted = voteGranted;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
